/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('image-detect', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model CancelTaskRequest {
  taskUid?: string(name='TaskUid'),
}

model CancelTaskResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', description='Id of the request'),
  success?: boolean(name='Success'),
}

model CancelTaskResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CancelTaskResponseBody(name='body'),
}

async function cancelTaskWithOptions(request: CancelTaskRequest, runtime: Util.RuntimeOptions): CancelTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.taskUid)) {
    query['TaskUid'] = request.taskUid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CancelTask',
    version = '2021-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function cancelTask(request: CancelTaskRequest): CancelTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return cancelTaskWithOptions(request, runtime);
}

model CreateTaskRequest {
  level?: int32(name='Level'),
  mqConfigName?: string(name='MqConfigName'),
  ossBucketName?: string(name='OssBucketName'),
  ossConfigName?: string(name='OssConfigName'),
  ossEndpoint?: string(name='OssEndpoint'),
  ossInputPath?: string(name='OssInputPath'),
  ossOutputPath?: string(name='OssOutputPath'),
  priority?: int32(name='Priority'),
  taskDescription?: string(name='TaskDescription'),
  taskName?: string(name='TaskName'),
}

model CreateTaskResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', description='Id of the request'),
  response?: {
    taskUid?: string(name='TaskUid'),
  }(name='Response'),
  success?: string(name='Success'),
}

model CreateTaskResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateTaskResponseBody(name='body'),
}

async function createTaskWithOptions(request: CreateTaskRequest, runtime: Util.RuntimeOptions): CreateTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.level)) {
    query['Level'] = request.level;
  }
  if (!Util.isUnset(request.mqConfigName)) {
    query['MqConfigName'] = request.mqConfigName;
  }
  if (!Util.isUnset(request.ossBucketName)) {
    query['OssBucketName'] = request.ossBucketName;
  }
  if (!Util.isUnset(request.ossConfigName)) {
    query['OssConfigName'] = request.ossConfigName;
  }
  if (!Util.isUnset(request.ossEndpoint)) {
    query['OssEndpoint'] = request.ossEndpoint;
  }
  if (!Util.isUnset(request.ossInputPath)) {
    query['OssInputPath'] = request.ossInputPath;
  }
  if (!Util.isUnset(request.ossOutputPath)) {
    query['OssOutputPath'] = request.ossOutputPath;
  }
  if (!Util.isUnset(request.priority)) {
    query['Priority'] = request.priority;
  }
  if (!Util.isUnset(request.taskDescription)) {
    query['TaskDescription'] = request.taskDescription;
  }
  if (!Util.isUnset(request.taskName)) {
    query['TaskName'] = request.taskName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateTask',
    version = '2021-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createTask(request: CreateTaskRequest): CreateTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return createTaskWithOptions(request, runtime);
}

model DeleteMqConfigRequest {
  configName?: string(name='ConfigName'),
}

model DeleteMqConfigResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', description='Id of the request'),
  success?: string(name='Success'),
}

model DeleteMqConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteMqConfigResponseBody(name='body'),
}

async function deleteMqConfigWithOptions(request: DeleteMqConfigRequest, runtime: Util.RuntimeOptions): DeleteMqConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.configName)) {
    query['ConfigName'] = request.configName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteMqConfig',
    version = '2021-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteMqConfig(request: DeleteMqConfigRequest): DeleteMqConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteMqConfigWithOptions(request, runtime);
}

model DeleteOssConfigRequest {
  configName?: string(name='ConfigName'),
}

model DeleteOssConfigResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', description='Id of the request'),
  success?: boolean(name='Success'),
}

model DeleteOssConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteOssConfigResponseBody(name='body'),
}

async function deleteOssConfigWithOptions(request: DeleteOssConfigRequest, runtime: Util.RuntimeOptions): DeleteOssConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.configName)) {
    query['ConfigName'] = request.configName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteOssConfig',
    version = '2021-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteOssConfig(request: DeleteOssConfigRequest): DeleteOssConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteOssConfigWithOptions(request, runtime);
}

model DetectImageRequest {
  imageUrl?: string(name='ImageUrl'),
}

model DetectImageResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', description='Id of the request'),
  response?: {
    data?: {
      info?: {
        category?: string(name='Category'),
        conf?: double(name='Conf'),
        direction?: string(name='Direction'),
        well?: string(name='Well'),
      }(name='Info'),
      results?: [ 
        {
          categoryList?: [ string ](name='CategoryList'),
          confList?: [ double ](name='ConfList'),
          direction?: string(name='Direction'),
          rect?: [ double ](name='Rect'),
          taskType?: string(name='TaskType'),
        }
      ](name='Results'),
    }(name='Data'),
    errorCode?: int32(name='ErrorCode'),
    errorMessage?: string(name='ErrorMessage'),
    flag?: boolean(name='Flag'),
  }(name='Response'),
  success?: boolean(name='Success'),
}

model DetectImageResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DetectImageResponseBody(name='body'),
}

async function detectImageWithOptions(request: DetectImageRequest, runtime: Util.RuntimeOptions): DetectImageResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.imageUrl)) {
    query['ImageUrl'] = request.imageUrl;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DetectImage',
    version = '2021-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function detectImage(request: DetectImageRequest): DetectImageResponse {
  var runtime = new Util.RuntimeOptions{};
  return detectImageWithOptions(request, runtime);
}

model GetMqConfigListRequest {
  pageIndex?: long(name='PageIndex'),
  pageSize?: long(name='PageSize'),
}

model GetMqConfigListResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', description='Id of the request'),
  response?: {
    list?: [ 
      {
        configName?: string(name='ConfigName'),
        gmtCreate?: string(name='GmtCreate'),
        mqAccessKey?: string(name='MqAccessKey'),
        mqEndpoint?: string(name='MqEndpoint'),
        mqGroupId?: string(name='MqGroupId'),
        mqTopic?: string(name='MqTopic'),
      }
    ](name='List'),
    pageIndex?: long(name='PageIndex'),
    pageSize?: long(name='PageSize'),
    total?: long(name='Total'),
  }(name='Response'),
  success?: boolean(name='Success'),
}

model GetMqConfigListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetMqConfigListResponseBody(name='body'),
}

async function getMqConfigListWithOptions(request: GetMqConfigListRequest, runtime: Util.RuntimeOptions): GetMqConfigListResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetMqConfigList',
    version = '2021-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getMqConfigList(request: GetMqConfigListRequest): GetMqConfigListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getMqConfigListWithOptions(request, runtime);
}

model GetOssConfigListRequest {
  configName?: string(name='ConfigName'),
  pageIndex?: long(name='PageIndex'),
  pageSize?: long(name='PageSize'),
}

model GetOssConfigListResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', description='Id of the request'),
  response?: {
    list?: [ 
      {
        accessKeyId?: string(name='AccessKeyId'),
        configName?: string(name='ConfigName'),
        gmtCreate?: string(name='GmtCreate'),
        ossBucketName?: string(name='OssBucketName'),
        ossEndpoint?: string(name='OssEndpoint'),
        uid?: string(name='Uid'),
      }
    ](name='List'),
    pageIndex?: long(name='PageIndex'),
    pageSize?: long(name='PageSize'),
    total?: long(name='Total'),
  }(name='Response'),
  success?: string(name='Success'),
}

model GetOssConfigListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetOssConfigListResponseBody(name='body'),
}

async function getOssConfigListWithOptions(request: GetOssConfigListRequest, runtime: Util.RuntimeOptions): GetOssConfigListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.configName)) {
    query['ConfigName'] = request.configName;
  }
  if (!Util.isUnset(request.pageIndex)) {
    query['PageIndex'] = request.pageIndex;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetOssConfigList',
    version = '2021-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getOssConfigList(request: GetOssConfigListRequest): GetOssConfigListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getOssConfigListWithOptions(request, runtime);
}

model GetTaskDetailRequest {
  taskUid?: string(name='TaskUid'),
}

model GetTaskDetailResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', description='Id of the request'),
  response?: {
    deduplicateProcessInfos?: [ 
      {
        flag?: boolean(name='Flag'),
        jsonNum?: int32(name='JsonNum'),
        resultNum?: int32(name='ResultNum'),
        videoName?: string(name='VideoName'),
      }
    ](name='DeduplicateProcessInfos'),
    deduplicateResultOssPath?: string(name='DeduplicateResultOssPath'),
    errorCode?: int32(name='ErrorCode'),
    exceptionMessage?: string(name='ExceptionMessage'),
    gmtCreate?: string(name='GmtCreate'),
    gmtModified?: string(name='GmtModified'),
    imageCompletedTotal?: int32(name='ImageCompletedTotal'),
    imageTotal?: int32(name='ImageTotal'),
    level?: int32(name='Level'),
    midResultOssPath?: string(name='MidResultOssPath'),
    mqAccessKey?: string(name='MqAccessKey'),
    mqConfigName?: string(name='MqConfigName'),
    mqEndpoint?: string(name='MqEndpoint'),
    mqGroupId?: string(name='MqGroupId'),
    mqTopic?: string(name='MqTopic'),
    ossAccessKeyId?: string(name='OssAccessKeyId'),
    ossBucketName?: string(name='OssBucketName'),
    ossConfigName?: string(name='OssConfigName'),
    ossEndpoint?: string(name='OssEndpoint'),
    ossInputPath?: string(name='OssInputPath'),
    ossOutputPath?: string(name='OssOutputPath'),
    priority?: int32(name='Priority'),
    taskDescription?: string(name='TaskDescription'),
    taskName?: string(name='TaskName'),
    taskStatus?: string(name='TaskStatus'),
    taskUid?: string(name='TaskUid'),
  }(name='Response'),
  success?: boolean(name='Success'),
}

model GetTaskDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetTaskDetailResponseBody(name='body'),
}

async function getTaskDetailWithOptions(request: GetTaskDetailRequest, runtime: Util.RuntimeOptions): GetTaskDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.taskUid)) {
    query['TaskUid'] = request.taskUid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetTaskDetail',
    version = '2021-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getTaskDetail(request: GetTaskDetailRequest): GetTaskDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return getTaskDetailWithOptions(request, runtime);
}

model GetTaskListRequest {
  pageIndex?: long(name='PageIndex'),
  pageSize?: long(name='PageSize'),
  taskStatus?: string(name='TaskStatus'),
}

model GetTaskListResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', description='Id of the request'),
  response?: {
    pageIndex?: long(name='PageIndex'),
    pageSize?: long(name='PageSize'),
    taskList?: [ 
      {
        gmtCreate?: string(name='GmtCreate'),
        gmtModified?: string(name='GmtModified'),
        level?: int32(name='Level'),
        priority?: string(name='Priority'),
        taskDescription?: string(name='TaskDescription'),
        taskName?: string(name='TaskName'),
        taskStatus?: string(name='TaskStatus'),
        taskUid?: string(name='TaskUid'),
      }
    ](name='TaskList'),
    total?: long(name='Total'),
  }(name='Response'),
  success?: boolean(name='Success'),
}

model GetTaskListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetTaskListResponseBody(name='body'),
}

async function getTaskListWithOptions(request: GetTaskListRequest, runtime: Util.RuntimeOptions): GetTaskListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.pageIndex)) {
    query['PageIndex'] = request.pageIndex;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.taskStatus)) {
    query['TaskStatus'] = request.taskStatus;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetTaskList',
    version = '2021-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getTaskList(request: GetTaskListRequest): GetTaskListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getTaskListWithOptions(request, runtime);
}

model SaveMqConfigRequest {
  configName?: string(name='ConfigName'),
  mqAccessKey?: string(name='MqAccessKey'),
  mqAccessSecret?: string(name='MqAccessSecret'),
  mqEndpoint?: string(name='MqEndpoint'),
  mqGroupId?: string(name='MqGroupId'),
  mqTopic?: string(name='MqTopic'),
}

model SaveMqConfigResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', description='Id of the request'),
  success?: boolean(name='Success'),
}

model SaveMqConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SaveMqConfigResponseBody(name='body'),
}

async function saveMqConfigWithOptions(request: SaveMqConfigRequest, runtime: Util.RuntimeOptions): SaveMqConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.configName)) {
    query['ConfigName'] = request.configName;
  }
  if (!Util.isUnset(request.mqAccessKey)) {
    query['MqAccessKey'] = request.mqAccessKey;
  }
  if (!Util.isUnset(request.mqAccessSecret)) {
    query['MqAccessSecret'] = request.mqAccessSecret;
  }
  if (!Util.isUnset(request.mqEndpoint)) {
    query['MqEndpoint'] = request.mqEndpoint;
  }
  if (!Util.isUnset(request.mqGroupId)) {
    query['MqGroupId'] = request.mqGroupId;
  }
  if (!Util.isUnset(request.mqTopic)) {
    query['MqTopic'] = request.mqTopic;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveMqConfig',
    version = '2021-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function saveMqConfig(request: SaveMqConfigRequest): SaveMqConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveMqConfigWithOptions(request, runtime);
}

model SaveOssConfigRequest {
  configName?: string(name='ConfigName'),
  ossAccessKeyId?: string(name='OssAccessKeyId'),
  ossAccessKeySecret?: string(name='OssAccessKeySecret'),
  ossBucketName?: string(name='OssBucketName'),
  ossEndpoint?: string(name='OssEndpoint'),
}

model SaveOssConfigResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', description='Id of the request'),
  success?: boolean(name='Success'),
}

model SaveOssConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SaveOssConfigResponseBody(name='body'),
}

async function saveOssConfigWithOptions(request: SaveOssConfigRequest, runtime: Util.RuntimeOptions): SaveOssConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.configName)) {
    query['ConfigName'] = request.configName;
  }
  if (!Util.isUnset(request.ossAccessKeyId)) {
    query['OssAccessKeyId'] = request.ossAccessKeyId;
  }
  if (!Util.isUnset(request.ossAccessKeySecret)) {
    query['OssAccessKeySecret'] = request.ossAccessKeySecret;
  }
  if (!Util.isUnset(request.ossBucketName)) {
    query['OssBucketName'] = request.ossBucketName;
  }
  if (!Util.isUnset(request.ossEndpoint)) {
    query['OssEndpoint'] = request.ossEndpoint;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveOssConfig',
    version = '2021-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function saveOssConfig(request: SaveOssConfigRequest): SaveOssConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveOssConfigWithOptions(request, runtime);
}

model UpdateTaskPriorityRequest {
  priority?: int32(name='Priority'),
  taskUid?: string(name='TaskUid'),
}

model UpdateTaskPriorityResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', description='Id of the request'),
  success?: boolean(name='Success'),
}

model UpdateTaskPriorityResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateTaskPriorityResponseBody(name='body'),
}

async function updateTaskPriorityWithOptions(request: UpdateTaskPriorityRequest, runtime: Util.RuntimeOptions): UpdateTaskPriorityResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.priority)) {
    query['Priority'] = request.priority;
  }
  if (!Util.isUnset(request.taskUid)) {
    query['TaskUid'] = request.taskUid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateTaskPriority',
    version = '2021-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateTaskPriority(request: UpdateTaskPriorityRequest): UpdateTaskPriorityResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateTaskPriorityWithOptions(request, runtime);
}

